import { Status } from './dicts';

export const enum RoleSystem {
  no,
  yes,
}

export interface Role {
  key: string;
  title: string;
  menus: string[];
  system: RoleSystem;
  status: Status;
  createTime: Date;
  updateTime?: Date;
}
const createTime = new Date();
const updateTime = createTime;

export default <Role[]>[
  {
    key: 'admin',
    title: '管理员',
    menus: [],
    system: RoleSystem.yes,
    status: Status.enable,
    createTime,
    updateTime,
  },
  {
    key: 'editor',
    title: '编辑',
    menus: ['system', 'system-user', 'system-user-uid'],
    system: RoleSystem.no,
    status: Status.enable,
    createTime,
    updateTime,
  },
  {
    key: 'customerService',
    title: '客服',
    menus: ['system', 'system-role', 'system-role-key'],
    system: RoleSystem.no,
    status: Status.enable,
    createTime,
    updateTime,
  },
  {
    key: 'guest',
    title: '游客',
    menus: [],
    system: RoleSystem.no,
    status: Status.enable,
    createTime,
    updateTime,
  },
];
